//基本的box盒子
import 'package:flutter/material.dart';

class BoxPage extends StatelessWidget {
  final Widget Box;//传入的child内容
  final String title;//box的抬头标题

  const BoxPage({Key key, this.Box, this.title}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
//      margin: EdgeInsets.all(10.0),
      padding: EdgeInsets.all(10.0),
      decoration: new BoxDecoration(
        color: Colors.white,
        borderRadius: new BorderRadius.all(new Radius.circular(5.0)),
      ),
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: <Widget>[
          Row(
            children: <Widget>[
              Container(
                width: 3.0,
                height: 15.0,
                color: Colors.blue,
                margin: EdgeInsets.only(right: 10.0),
              ),
              Text('$title',style: TextStyle(fontSize: 16.0,fontWeight: FontWeight.w700),)
            ],
          ),
          SizedBox(
            height: 20.0,
          ),
          Box
        ],
      ),
    );
  }
}
